import struct
import json

path = 'C:/Users/yangjianzhang/Desktop/134json.txt'
sum_ = 0;
with open(path, 'r', encoding='utf-8') as f:
    a = json.load(f)
    # print(a)
    for i in a['data']:
        # print(i['weight'])
        sum_ = sum_ + i['weight']
f.close()

print(sum_)
